<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{log_name} : {log_account_no}</title>
<link rel="shortcut icon" href="{dir_image}favicon.ico">
<link rel="stylesheet" type="text/css" href="{dir_css}Global.css" />
<link rel="stylesheet" type="text/css" href="{dir_css}Popup.css" />
<link rel="stylesheet" type="text/css" href="{dir_css}Registrar.css" />

<script type="text/javascript" src="{dir_js}jquery.min.js"></script>
<script type="text/javascript" src="{dir_js}Global.js"></script>
</head>

<body>
<!-- POPUP -->{page_popup}<!-- POPUP END -->
<!-- TOP HEADER -->{page_header}<!-- TOP HEADER END -->
	<div class="main-content">
		<input type="hidden" id="record_saved" value="{record_saved}"/>
		<table width="0" border="0" cellspacing="0" cellpadding="0">
			<tr valign="top" align="left">
				<td width="220">
					{reg_sub_menu}
				</td>
				<td width="755">
					<div class="page-sub-content">
					<div class="ann-top-label">Search Students Grades</div>
					<form method="get" enctype="multipart/form-data" action="" id="search_form">
						<input type="hidden" name="page" value="{urlPage}"  />
						<div class="search-image-design-grades">
							<table width="0" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="120" height="28">Student Number</td>
									<td width="10">:</td>
									<td width="500"><input type="text" name="txtstudno" class="text-input" value="{txtstudno}"/></td>
								</tr>
								<tr>
									<td height="28">Subjects</td>
									<td>:</td>
									<td>{subjectsselect}</td>
								</tr>
								<tr>
									<td height="28">Semester</td>
									<td>:</td>
									<td>{semesterselect}</td>
								</tr>
								<tr>
									<td height="28"></td>
									<td></td>
									<td><input type="submit" name="subButton" class="search-input" value="Search"/> <input type="button" class="search-input" value="Refresh" onclick="linkNewPage('StudentIncGrade')"/></td>
								</tr>
								
							</table>

						</div>
					</form>
					
					<table width="750" border="0" cellspacing="0" cellpadding="0">
						{header_table}
						<!-- BEGIN students -->
							<tr {bgcolor} class="hover-light">
								<td class="td-record">{stud_no}</td>
								<td class="td-record">{name}</td>
								<td class="td-record">{course_subject}</td>
								<td class="td-record">{section}</td>
								<td class="td-record" width="90">{grades}</td>
								<td class="td-record" width="50" align="center">{convertion}</td>
								<td class="td-record" width="120" align="center">{description}</td>
							</tr>
						<!-- END students -->
						
						<tr><td colspan="9" height="12"></td></tr>
						<tr>
							<td colspan="9" align="right" height="20">{pagination}</td>
						</tr>
					</table>
					
					
					</div>
				</td>
			</tr>
		</table>
		
	</div>
<!-- FOOTER -->{page_footer}<!-- FOOTER -->
<script type="text/javascript">
	<!--
	
	function is_int(value){ 
	   return !isNaN(parseInt(value * 1));
	}
	function saveGradeInput(strStud, strSubj, strCourse, strSem, strYear) {
		
		if ( $('#input_transfer'+strStud).val() == '' || $('#input_transfer'+strStud).val() <= 0 ) {
			$('#input_transfer'+strStud).addClass('transfery-warning-input');
			return false;
		}
		else {
			
			var inputValue = !isNaN(parseInt($('#input_transfer'+strStud).val() * 1));
			
			if ( inputValue == true || $('#input_transfer'+strStud).val() == 'INC' || $('#input_transfer'+strStud).val() == 'DRP') {
				$('#input_transfer'+strStud).removeClass('transfery-warning-input');
				$.post('request.php', {AJAXPost:'SaveStudentGrades', stud_id:strStud, subj_id:strSubj, course_id:strCourse, sem_id:strSem, year_id:strYear, grades:$('#input_transfer'+strStud).val(), stud_subj_id:$('#id_transfer'+strStud).val() }, function(res) {
					$('#id_transfer'+strStud).val(res.stud_subj_id);
					$('#transfery_grades'+strStud).html(res.grade_convertion);
					
					if ( $('#input_transfer'+strStud).val() != '') {
						if ( $('#input_transfer'+strStud).val() == 'INC' )
							subjDescription = '<span class="font-red">Incomplete</span>';
						else if ( $('#input_transfer'+strStud).val() == 'DRP' )
							subjDescription = '<span class="font-red">Drop</span>';
						else {
							subjDescription = res.description;
						}
					}
					$('#transfery_pfid'+strStud).html(subjDescription);
					
				
				}, 'json');
			}
			else {
				$('#input_transfer'+strStud).addClass('transfery-warning-input');
				return false;
			}
			
		}
	}
		
	//-->
</script>
</body>
</html>
